package com.ece.demo.init;

import org.apache.commons.lang3.StringUtils;

import dev.ece.suit.loader.BoneModel3D;
import dev.ece.suit.loader.FrameModel3D;
import dev.ece.suit.loader.Sprite3DFactory;
import dev.ece.suit.loader.models.ms3d.MS3DModelLoader;
import dev.ece.util.obj.ObjectCount;
import dev.ece.util.tools.Constants;

public class Sprite3DFactoryDemo extends Sprite3DFactory {

	private static Sprite3DFactoryDemo instance = new Sprite3DFactoryDemo();
	
	public static Sprite3DFactoryDemo getSprite3DFactory() {
		return instance;
	}
	
	@Override
	public ObjectCount<BoneModel3D> createBoneModel3D(String name) throws Exception {
		String path = StringUtils.join("/assets/models/", name);
		MS3DModelLoader ms3dloader = new MS3DModelLoader(Constants.getGameFile(path));
		BoneModel3D model = new BoneModel3D(ms3dloader);
		return new ObjectCount<BoneModel3D>(name, model);
	}

	@Override
	public ObjectCount<FrameModel3D> createFrameModel3D(String name) {
		return null;
	}

}
